



$tableCfg = {
  space: $space-minor
  space-sm: $space-small
  borderColor: $color-line-input
  headFw: bold
}

ss-func-table($class='.ss-table', $config = false)
  cfg = merge({}, $tableCfg, $config)
  {$class}
    display: table
    .table-head, .item-tr
      display: table-row
    .list-body
      display: table-row-group
    .item-td
      display: table-cell
      padding: cfg.space
    .table-head
      .item-td
        font-weight: cfg.headFw
        
  ss-table-border($class, cfg.borderColor, cfg.space)
    
//控制奇偶变色
ss-odd-event($odd-background = #fff, $even-background = $color-bg)
  &:nth-of-type(odd)
    background: $odd-background
  &:nth-of-type(even)
    background: $even-background

//鼠标 hover事件
ss-table-hover($bg = #e6f7ff)
  &:hover
    background-color: $bg


//控制border

ss-table-border($class='.ss-table', $bc = '#eee', $space='.75rem', $trClass='.item-tr', $tdClass='.item-td')
  {$class}
    border: 1px solid $bc
    border-collapse: collapse;
    box-sizing: border-box
    {$trClass}
      border-top: @border
    {$tdClass}
      border-left: @border
      padding: $space

// // ss-table-fixd($class= '.ss-table-body', $height = 200px)
// //   {$class}
// //     overflow-y: auto
// //     height: $height